<?php 

$img = 'public/upload/'.$this->controller.'/'.$this->id.'_tb.*';
foreach (glob($img) as $src) {
    ?>
        <div class="cnt_btn">
            <ul class="ui-widget ui-helper-clearfix">
                <li title="Editar" class="ui-state-highlight ui-corner-all edt_foto" id="<?php echo $this->id ?>"><span class="ui-icon ui-icon-wrench"></span></li>
                <li title="Excluir" class="ui-state-error ui-corner-all del_foto" id="<?php echo $this->id; ?>"><span class="ui-icon ui-icon-closethick"></span></li>
            </ul>
        </div>
    <?php echo '<a href="'.$this->urlbase.'/'.str_replace('_tb.', '.',$src).'" data-lightbox="roadtrip" /><img title="" src="'.$this->urlbase.'/'.$src.'" /></a>'; ?>
               
    <?php //echo '<img  src="'.$this->urlbase.'/'.$src.'" />'; ?>
    
    <?php
}

?>